﻿using System;
using System.Collections.Generic;
using System.Text;

namespace 设计模式
{
    class jianli
    {
    }

    class Resume : ICloneable
    {

        private string name;
        private string sex;
        private string age;
        private string timeArea;
        private string company;

        public Resume(string name) {
            this.name = name;
        }

        public void SetPersonalInfo(string sex,string age) {
            this.sex = sex;
            this.age = age;
        }

        public void SetWorkExperience(string timeArea, string company)
        {
            this.timeArea = timeArea;
            this.company = company;
        
        }


        public void Display() {
            Console.WriteLine("{0}{1}{2}",name,sex,age);
            Console.WriteLine("工作经历：{0}{1}",timeArea,company);
        }

        public object Clone() {
            return (object)this.MemberwiseClone();
        }


        public static void main()
        {
            Resume a = new Resume("zr");
            a.SetPersonalInfo("男","29");
            a.SetWorkExperience("2005-2006","**公司");

            Resume b = (Resume)a.Clone();
            b.SetWorkExperience("2007-2008","**公司");

            Resume c = (Resume)a.Clone();
            c.SetWorkExperience("2009-2010", "**公司");


            a.Display();
            b.Display();
            c.Display();

            Console.Read();
        }
    }




}



